﻿USE [EventScavenger5]
GO
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'DatabaseVersion')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'DatabaseVersion', N'5.0')
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'MaxLogEntries')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'MaxLogEntries', N'5000000')
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'NextCreateHistoryFrequencyMinutes')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'NextCreateHistoryFrequencyMinutes', N'1440')
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'NextCreateHistoryTime')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'NextCreateHistoryTime', N'2010-01-01 00:00:00')
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'RepeatTimeSec')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'RepeatTimeSec', N'2')
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'MaintenanceRunner')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'MaintenanceRunner', N'(Default collector name)')
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'MaintenanceFrequencyMinutes')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'MaintenanceFrequencyMinutes', N'15')
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'MaintenanceEnabled')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'MaintenanceEnabled', N'True')	
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'MaintenanceLastRun')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'MaintenanceLastRun', N'2010-1-1')	
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'DaysToHistory')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'DaysToHistory', N'7')
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'RunCreateHistoryEnabled')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'RunCreateHistoryEnabled', N'True')
IF not exists(select * from [dbo].[Settings] WHERE [SettingName] like N'MaintenanceTimeOutSeconds')
INSERT [dbo].[Settings] ([SettingName], [SettingValue]) 
VALUES (N'MaintenanceTimeOutSeconds', N'300')


